package com.beamfield.dao.lab;

import com.beamfield.model.InstrumentMaintenance;
import com.beamfield.model.InstrumentMaintenanceExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public interface InstrumentMaintenanceMapper {
    int countByExample(InstrumentMaintenanceExample example);

    int deleteByPrimaryKey(Long id);

    int insert(InstrumentMaintenance record);

    int insertSelective(InstrumentMaintenance record);

    List<InstrumentMaintenance> selectByExample(InstrumentMaintenanceExample example);

    InstrumentMaintenance selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(InstrumentMaintenance record);

    int updateByPrimaryKey(InstrumentMaintenance record);

    InstrumentMaintenance getLastMaintenance(@Param("instr_no")String instr_no,@Param("beam_id")Long beam_id);

    List<InstrumentMaintenance> getMaintenancePage(@Param("offset")Integer offset, @Param("limit")Integer limit,@Param("instr_no")String instr_no,@Param("beam_id")Long beam_id);

    int getCount(@Param("instr_no")String instr_no,@Param("beam_id")Long beam_id);

}